﻿<%@ Page Language="C#" Theme="Default" MasterPageFile="~/MasterPages/admin.master"
    AutoEventWireup="true" CodeFile="Article.aspx.cs" Inherits="Admin_Article" Title="Article List" %>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" runat="Server">
    Article List</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <data:GridViewSearchPanel ID="GridViewSearchPanel1" runat="server" GridViewControlID="GridView1"
        PersistenceMethod="Session" />
    <br />
    <data:EntityGridView ID="GridView1" runat="server" AutoGenerateColumns="False" OnSelectedIndexChanged="GridView1_SelectedIndexChanged"
        DataSourceID="ArticleDataSource" DataKeyNames="Id" AllowMultiColumnSorting="false"
        DefaultSortColumnName="" DefaultSortDirection="Ascending" ExcelExportFileName="Export_Article.xls">
        <Columns>
            <asp:CommandField ShowSelectButton="True" ShowEditButton="True" />
            <asp:BoundField DataField="OriginalId" HeaderText="Original Id" SortExpression="[OriginalId]" />
            <asp:BoundField DataField="Title" HeaderText="Title" SortExpression="[Title]" />
            <asp:BoundField DataField="Alias" HeaderText="Alias" SortExpression="[Alias]" />
            <asp:BoundField DataField="Intro" HeaderText="Intro" SortExpression="[Intro]" />
            <asp:BoundField DataField="MainContent" HeaderText="Main Content" SortExpression="" />
            <asp:BoundField DataField="LinkImage" HeaderText="Link Image" SortExpression="[LinkImage]" />
            <asp:BoundField DataField="MenuId" HeaderText="Menu Id" SortExpression="[MenuId]" />
            <asp:BoundField DataField="MenuTitle" HeaderText="Menu Title" SortExpression="[MenuTitle]" />
            <asp:BoundField DataField="MenuAlias" HeaderText="Menu Alias" SortExpression="[MenuAlias]" />
            <asp:BoundField DataField="MenuLink" HeaderText="Menu Link" SortExpression="[MenuLink]" />
            <asp:BoundField DataField="Language" HeaderText="Language" SortExpression="[Language]" />
            <data:BoundRadioButtonField DataField="IsDisabled" HeaderText="Is Disabled" SortExpression="[IsDisabled]" />
            <data:BoundRadioButtonField DataField="IsRemoved" HeaderText="Is Removed" SortExpression="[IsRemoved]" />
            <asp:BoundField DataField="DatePublish" DataFormatString="{0:d}" HtmlEncode="False"
                HeaderText="Date Publish" SortExpression="[DatePublish]" />
            <asp:BoundField DataField="DateCreate" DataFormatString="{0:d}" HtmlEncode="False"
                HeaderText="Date Create" SortExpression="[DateCreate]" />
            <asp:BoundField DataField="UserCreate" HeaderText="User Create" SortExpression="[UserCreate]" />
            <asp:BoundField DataField="DateModify" DataFormatString="{0:d}" HtmlEncode="False"
                HeaderText="Date Modify" SortExpression="[DateModify]" />
            <asp:BoundField DataField="UserModify" HeaderText="User Modify" SortExpression="[UserModify]" />
        </Columns>
        <EmptyDataTemplate>
            <b>No Article Found!</b>
        </EmptyDataTemplate>
    </data:EntityGridView>
    <br />
    <asp:Button runat="server" ID="btnArticle" OnClientClick="javascript:location.href='ArticleEdit.aspx'; return false;"
        Text="Add New"></asp:Button>
    <data:ArticleDataSource ID="ArticleDataSource" runat="server" SelectMethod="GetPaged"
        EnablePaging="True" EnableSorting="True">
        <Parameters>
            <data:CustomParameter Name="WhereClause" Value="" ConvertEmptyStringToNull="false" />
            <data:CustomParameter Name="OrderByClause" Value="" ConvertEmptyStringToNull="false" />
            <asp:ControlParameter Name="PageIndex" ControlID="GridView1" PropertyName="PageIndex"
                Type="Int32" />
            <asp:ControlParameter Name="PageSize" ControlID="GridView1" PropertyName="PageSize"
                Type="Int32" />
            <data:CustomParameter Name="RecordCount" Value="0" Type="Int32" />
        </Parameters>
    </data:ArticleDataSource>
</asp:Content>
